package bookstore.servlet;

import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import bookstore.database.pojo.BookType;
import bookstore.database.pojo.BookTypeDAO;

public class AutoRunServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public void init() throws ServletException {
		ServletContext application = this.getServletContext(); 
		@SuppressWarnings("unchecked")
		List<BookType> bookTypes = new BookTypeDAO().findAll();
		application.setAttribute("bookTypes", bookTypes);
		
	}
}
